<?php

namespace App\Library\Requests\ShopProductSpec;

use App\Library\Requests\Base\BaseDTORequest;

class ShopProductSpecAddRequest extends BaseDTORequest
{
    public function rules(): array
    {
        return [
            'productNumber' => 'nullable|string|size:20|regex:' . __('com.numReg'),
            'psName' => 'required|string|max:50',
            'buyWillPrice' => 'nullable|decimal:2',
            'psPrice' => 'nullable|decimal:2',
            'psPriceUnderlined' => 'required|decimal:2',
            'psUsableStock' => 'required|integer|min:1',
            'psBuyLimit' => 'nullable|integer|min:0',
            'imgId' => 'nullable|integer|min:1',
            'commission' => 'nullable|decimal:2',
            'commissionRatio' => 'nullable|integer|between:1,99',
            'randProductId' => 'required|string|size:20|regex:' . __('com.numReg'),
        ];
    }
}
